<mat-chip-set #chipset class="body" [cdkContextMenuTriggerFor]="menu"  cdkDropList cdkDropListOrientation="horizontal" (cdkDropListDropped)="drop($event)"> 
  <mat-chip  
    [style.width]="rendering_width+'px'" 
    *ngFor="let item of windowDtos"
    cdkDrag 
    [cdkDragData]="item"
    [cdkContextMenuTriggerFor]="window_menu"
    [cdkContextMenuTriggerData]="{$implicit: item}"
    (click)="wsm.showOrHide(item.id)">
    {{item.title}}
    </mat-chip> 
</mat-chip-set>
 
<ng-template #menu>
    <div class="menu" cdkMenu>  
      <button class="menu-item" cdkMenuItem (click)="wsm.closeAll()" >关闭所有窗口</button> 
    </div>
</ng-template>
<ng-template #window_menu let-data>
    <div class="menu" cdkMenu  >  
      <button class="menu-item"  cdkMenuItem (click)="wsm.hide(data.id)" >最小化</button>
      <button class="menu-item"  cdkMenuItem  (click)="wsm.close(data.id)" >关闭</button>
    </div>
</ng-template>
